//
//  PaintingImageTableViewCell.swift
//  NDAi
//
//  Created by 丸子 on 2024/6/20.
//

import UIKit

class PaintingImageTableViewCell: UITableViewCell {
    
    private lazy var backView: UIView = {
        let view = UIView()
        view.backgroundColor = UIColor(hexString: "#25262B")
        view.allRound(4)
        return view
    }()
    
    lazy var imageIV: UIImageView = {
        let imageView = UIImageView()
        imageView.image = UIImage(named: "ai_launch_logo")
        imageView.contentMode = .scaleToFill
        imageView.clipsToBounds = true
        return imageView
    }()
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        self.selectionStyle = .none
        self.backgroundColor = .clear
        self.contentView.addSubviews([backView])
        backView.addSubview(imageIV)
        backView.snp.makeConstraints { make in
            make.top.equalToSuperview().offset(22)
            make.leading.trailing.equalToSuperview().inset(16)
//            make.height.equalTo(backView.snp.width)
            make.bottom.equalToSuperview().offset(-20)
        }
        imageIV.snp.makeConstraints { make in
            make.edges.equalToSuperview()
        }
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
}
